Strategy

objects.Strategy()

Class representing a strategy in FloodAdapt.

A strategy is a collection of measures that can be applied to a model.

Attributes

measures : list[str]

A list of measures associated with the strategy. Should be a list of measure names that are saved in the database.

Methods

Name Description
get_measures Get the measures associated with this strategy.
initialize_measure_objects Initialize the measure objects associated with this strategy.

get_measures

objects.Strategy.get_measures()

Get the measures associated with this strategy.

Note that this method will return the measure objects, not just their names. The measure objects are initialized using the initialize_measure_objects method.

Returns

measures : list[Measure]

The list of measure objects associated with this strategy.

Raises

: ValueError

If the measure objects have not been initialized.

initialize_measure_objects

objects.Strategy.initialize_measure_objects(measures: list[Measure])

Initialize the measure objects associated with this strategy.

Parameters

measures : list[Measure]

A list of measure objects to be associated with this strategy. Should be a list of measure objects that are saved in the database.

Back to top